﻿/*
openEco 0.000.1
Steven Chick  111204
Added Public voids for dates, times and precision
 */
using System;

namespace openEco
{
    public class Calculation : IOpenEco
    {
    	//Insolation Calculation
        public void ObjectCalculation(string Target, int Type, int Select3D, int Accumulation, int Metric){

    		string myObjectCalc  = "Calc.Insolation " + Target + " " + Type.ToString() + " " + Select3D.ToString() + " " + Accumulation.ToString() + " " + Metric.ToString();
			cmd.Execute(myObjectCalc, 1000);
    		
        }
    	//Sets Calc dates
    	public void CalculationDates(int startdate, int enddate){
    	
    		string dates = "set.calc.dates " + startdate.ToString() + " " + enddate.ToString();
    	cmd.Execute(dates, 1000);
    	
    }
    	//Sets Calc times
    	public void CalculationTimes(int starttime, int endtime){
    		
    		string times = "set.calc.times " + starttime.ToString() + " " + endtime.ToString();
    		cmd.Execute(times, 1000);
    		
    	}
    	public void sunangles (){
    		
    		string angles = "set.radiance.flag 1024 false";
    		cmd.Execute(angles,1000);
    			
    	}
    	public void designsky(){
    	
    		string sky = "set.radiance.flag 1024 false";
    		cmd.Execute(sky,1000);
    	
    	}
    	public void shadeangles(int angle){
    		string subdivide = "set.shading.angles " + angle + "" + angle;
    		cmd.Execute(subdivide,1000);
    	}
        public Calculation(NDde.Client.DdeClient c, NDde.Client.DdeClient r) : base(c,r){
    }
    }
}